require.config({
    baseUrl:"./modules-list",
    paths:{
        jq: "./libs/jquery.2.2.4.js",
        setLocal: "setLocal"
    },
    
})

require(["jq","setLocal"],function(_, sl){
    // 3. 绑定事件
    let add=document.querySelectorAll(".add");

    for(let a=0;a<add.length;a++){
        add[a].onclick=function(){
            let id = this.parentNode.getAttribute("index");
            let price = this.parentNode.querySelector("span").innerHTML;
            sl({id, price, num:1, flag:0});
        }        
    }

})
